Skip to content

Conversation

@Dallas98
Copy link
Collaborator

@Dallas98 Dallas98 commented Jan 26, 2026

This pull request introduces several key improvements and refactorings across the backend and frontend, primarily focusing on unifying model configuration management, updating service routing, and refactoring how LLM (Large Language Model) clients are created and used. The changes standardize the model configuration table and ORM usage in both Java and Python, introduce a new LLM factory for consistent model client instantiation, and update proxy and routing logic for better service separation.

Key changes include:

Model Configuration Standardization

  • Renamed the model configuration table from t_model_config to t_models in both Java (ModelConfig.java) and Python (models.py), and updated the corresponding ORM class names and references throughout the codebase. Added an is_deleted field and switched boolean fields to use Boolean type instead of Integer for clarity and consistency. [1] [2] [3] [4] [5]
  • Updated all usages of the old model config logic in evaluation and RAG modules to use the new Models class and get_model_by_id helper, ensuring consistent model retrieval and property access. [1] [2] [3] [4] [5] [6] [7]

LLM Client Factory Introduction

  • Introduced a new LLMFactory module (app/module/shared/llm/__init__.py) to centralize and standardize the creation of chat and embedding model clients, as well as related utilities. Updated generation and RAG services to use this factory for all LLM interactions, replacing previous ad-hoc client creation logic. [1] [2] [3] [4] [5] [6] [7]

API Gateway and Frontend Proxy Routing

  • Updated the API gateway routing to unify Python backend service routes under a single route and expanded the path matching to include /api/models/**.
  • Refactored the frontend Vite proxy configuration to dynamically route requests to either the Python or Java backend based on the API path, improving maintainability and service separation.

RAG Service Dependency Injection

  • Improved the FastAPI RAG interface to use dependency injection for the RAGService, simplifying endpoint logic and making it easier to manage dependencies. [1] [2]
  • Cleaned up the RAG service constructor and removed unused background task logic.

These changes collectively improve maintainability, consistency, and scalability of model management and service orchestration across the system.

@Dallas98 Dallas98 changed the title Dev refactor(models): unify model configuration and standardize LLM client factory Jan 30, 2026
@Dallas98 Dallas98 merged commit f40893c into main Jan 30, 2026
22 checks passed
@Dallas98 Dallas98 deleted the dev branch January 30, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants